#coding:utf-8

# --------------------------------------------------------------------------------
# 审查机构的管理
# --------------------------------------------------------------------------------
module QueryService
  def self.registered(app)

    app.get "/ratio" do
      param :to,    Date, required: true, default: lambda {Date.today}
      
      QueryDomain.ratio(params[:to]).to_json
    end


    app.get "/lost" do
      QueryDomain.lost.to_json
    end


    app.get "/duedate" do
      param :to,    Date, required: true, default: lambda {Date.today}

      QueryDomain.due_date(params[:to]).to_json
    end
  end
end
